﻿@model DataSharing.Models.StudentInfo
@{
    ViewBag.Title = "Index";
}

<h2>Khai thác từ ViewBag/ViewData</h2>
<ul>
    <li>Id: @ViewBag.Id</li>
    <li>Name: @ViewData["Name"]</li>
    <li>Marks: @ViewBag.Marks</li>
</ul>
<ul>
    <li>Id: @ViewBag.Student.Id</li>
    <li>Name: @ViewBag.Student.Name</li>
    <li>Marks: @ViewBag.Student.Marks</li>
</ul>

<h2>Khai thác từ Model</h2>
<ul>
    <li>Id: @Model.Id</li>
    <li>Name: @Model.Name</li>
    <li>Marks: @Model.Marks</li>
</ul>